<?php
/**
 * Unfuddle Component Model
 *
 * @package     Unfuddle
 * @subpackage  Data Models
 * @author      Luke Visinoni <luke.visinoni@gmail.com>
 * @copyright   (c) 2010 Luke Visinoni <luke.visinoni@gmail.com>
 * @version     $Id: Component.php 29 2011-05-09 07:08:53Z luke.visinoni $
 */
class Unfuddle_Model_Component extends Unfuddle_Model_Abstract {

    /**
     * Returns components within a given project
     */
    const URI_COMPONENTS = '/projects/%d/components';
    
    /**
     * Returns a particular component for a particular project
     */
    const URI_COMPONENT_BY_ID = '/projects/%d/components/%d';
    
    /**
     * @var string Model name
     */
    protected $_name = 'component';
    
    /**
     * @var array Model fields
     */
    protected $_fields = array (
        'created-at' => array('type' => 'datetime', 'required' => false, 'read-only' => true),
        'id' => array('type' => 'integer', 'required' => false, 'read-only' => true),
        'name' => array('type' => 'text', 'required' => false, 'read-only' => false),
        'project-id' => array('type' => 'integer', 'required' => false, 'read-only' => true),
        'updated-at' => array('type' => 'datetime', 'required' => false, 'read-only' => true),
    );

}
